<!DOCTYPE html>
<head xmlns:th="http://www.w3.org/1999/xhtml">
  <meta charset="UTF-8">
  <title>Insert title here</title>
  <!-- 引入整个common页面 -->
  <div th:insert="common/common.html"></div>

  <script type="text/javascript">
    //登录
    function loginUser(){
      $.ajax({
        url:"/login/checklogin",
        type:"post",
        dataType:"json",
        data:$("#loginForm").serialize(),
        async:false,
        success:function(result){
          if(result.code){
            toastr.success(result.message);
            location.href = "/login/toTreeview";
          }else{
            toastr.warning(result.message);
          }

        },
        error:function(){
          toastr.error("系统错误");
        }
      })
    }
  </script>

</head>
<!-- meta data -->
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->

<!--font-family-->
<link href="https://fonts.googleapis.com/css?family=Poppins:100,200,300,400,500,600,700,800,900&amp;subset=devanagari,latin-ext" rel="stylesheet">

<!-- title of site -->
<title>Sign in</title>

<!-- For favicon png -->
<link rel="shortcut icon" type="image/icon" href="/assets/logo/favicon.png"/>

<!--font-awesome.min.css-->
<link rel="stylesheet" href="/assets/css/font-awesome.min.css">

<!--animate.css-->
<link rel="stylesheet" href="/assets/css/animate.css">

<!--bootstrap.min.css-->
<link rel="stylesheet" href="/assets/css/bootstrap.min.css">

<!-- bootsnav -->
<link rel="stylesheet" href="/assets/css/bootsnav.css" >

<!--style.css-->
<link rel="stylesheet" href="/assets/css/style.css">

<!--responsive.css-->
<link rel="stylesheet" href="/assets/css/responsive.css">
</head>
<body>
<form id="loginForm">
  <!-- signin end -->
  <section class="signin popup-in">
    <div class="container">

      <div class="sign-content popup-in-content">
        <div class="popup-in-txt">
          <h2>sign in</h2>
          <div class="row">
            <div class="col-sm-12">
              <div class="signin-form">

                <div class="form-group">
                  <label for="userName">Username</label>
                  <input type="text" name="username" class="form-control" id="userName" placeholder="enter your Username here">
                </div><!--/.form-group -->
                <div class="form-group">
                  <label for="userPwd">Password</label>
                  <input type="password" name="password" class="form-control" id="userPwd" placeholder="Password">
                </div><!--/.form-group -->

              </div><!--/.signin-form -->
            </div><!--/.col -->
          </div><!--/.row -->

          <div class="row">
            <div class="col-sm-12">
              <div class="signin-password">
                <div class="awesome-checkbox-list">
                  <ul class="unstyled centered">

                    <li>
                      <input class="styled-checkbox" id="styled-checkbox-2" type="checkbox" value="">
                      <label for="styled-checkbox-2">remember password</label>
                    </li>

                    <li>
                      <a href="#">Forgot email or password ?</a>
                    </li>

                  </ul>
                </div><!--/.awesome-checkbox-list -->
              </div><!--/.signin-password -->
            </div><!--/.col -->
          </div><!--/.row -->

          <div class="row">
            <div class="col-sm-12">
              <div class="signin-footer">
                <button type="button" onclick="loginUser()" class="btn signin_btn">
                  sign in
                </button>
                <p>
                  Don’t have an Account ?
                  <a href="#">register</a>
                </p>
              </div><!--/.signin-footer -->
            </div><!--/.col-->
          </div><!--/.row -->
        </div><!-- .popup-in-txt -->
      </div><!--/.sign-content -->
    </div><!--/.container -->

  </section><!--/.signin -->

  <!-- signin end -->

  <!--footer copyright start -->
  <footer class="footer-copyright">
    <div id="scroll">
      <i class="fa fa-angle-double-up return-to-top" id="scroll-top" data-toggle="tooltip" data-placement="top" title="" data-original-title="Back to Top" aria-hidden="true"></i>
    </div><!--/.scroll-Top-->

  </footer><!--/.hm-footer-copyright-->

  <script src="/assets/js/jquery.js"></script>

  <!--modernizr.min.js-->
  <script src="https://cdnjs.cloudflare.com/ajax/libs/modernizr/2.8.3/modernizr.min.js"></script>

  <!--bootstrap.min.js-->
  <script src="/assets/js/bootstrap.min.js"></script>

  <!-- bootsnav js -->
  <script src="/assets/js/bootsnav.js"></script>

  <!-- jquery.sticky.js -->
  <script src="/assets/js/jquery.sticky.js"></script>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-easing/1.4.1/jquery.easing.min.js"></script>


  <!--Custom JS-->
  <script src="/assets/js/custom.js"></script>
</form><!--/form -->
</body>
</html>
